import React from 'react'
// import './App.css';
import Layout from '../src/view/Layout/index'
import {
  Route,
  Switch,
  Redirect,
  BrowserRouter as Router
} from 'react-router-dom'
import Login from '../src/view/Login/index'
import NotFound from '../src/view/NotFound/index'
import Detail from '../src/view/Detail/index'
import AuthRoute from './AuthRoute'
// import List from '../src/view/List/index'
import List from '../src/view/List/list'

function App () {
  return (
    <div className='App'>
      <Router>
        <Switch>
          <Route path='/login' component={Login}></Route>
          {/* <AuthRoute> */}
          <Route path='/layout' component={Layout} />
          {/* </AuthRoute> */}
          <Route path='/detail' component={Detail} />
          <Route path='/list' component={List} />
          <Redirect exact from='/' to='/layout' />
          <Route path='/' component={NotFound} />
        </Switch>
      </Router>
    </div>
  )
}

export default App
